package com.winsafe.basescan;

import android.os.Bundle;
import android.util.Log;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import com.winsafe.scanlibrary.base.BaseScanFragmentActivity;

public class FragmentScanActivity extends BaseScanFragmentActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_f);

        OneFragment oneFragment = new OneFragment();
        TwoFragment twoFragment = new TwoFragment();

        FragmentManager supportFragmentManager = getSupportFragmentManager();
        FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
        fragmentTransaction.add(R.id.fl_container_1, oneFragment);
        fragmentTransaction.add(R.id.fl_container_2, twoFragment);
        fragmentTransaction.commit();

    }

    @Override
    protected void onScanResult(String idCode) {
        Log.e("FragmentScanActivity", idCode);
    }
}